<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>建模管理</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/commen.css"/>
    <script src="../../../../../js/ase.js" type="text/javascript"></script>
    <script src="../../../../../js/aesutil.js" type="text/javascript"></script>
    <script src="../../../../scripts/boot.js" type="text/javascript"></script>
    <script src="../../../../../js/dateUtil.js" type="text/javascript"></script>
</head>
<body>
	<!--按钮栏-->
    <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
		<table style="width:100%;">
			<tr>
            	<td style="width:100%;">
            		<!-- 菜单按钮(带箭头，可选择功能) -->
            		<a id="addBtn" class="mini-menubutton" plain="true" iconCls="icon-add" enabled="false" menu="#addMenu">增加</a>
            		<a id="editBtn" class="mini-menubutton" plain="true" iconCls="icon-edit" enabled="false" menu="#editMenu">编辑</a>
            		<a id="removeBtn" class="mini-menubutton" plain="true" iconCls="icon-remove" enabled="false" menu="#removeMenu">删除</a>
                    <!-- <a class="mini-button" id="removeBtn" iconCls="icon-remove" enabled="false" onclick="remove()">删除</a>   -->          
                    <!-- <a class="mini-button" id="releaseBtn" plain="true" iconCls="icon-ok" enabled="false" onclick="release()">发布</a> -->            
                </td>            
               <!--  <td style="white-space:nowrap;">
                	<a class="mini-button" iconCls="icon-reload" onclick="refresh()">刷新</a>
                </td> -->
			</tr>                    
		</table>               
	</div>        
    <!--树形联动：模块菜单(大盒子)-->
    <div class="mini-splitter" style="width:100%;height:94%;">
        <!--左侧树-->
        <div size="240" showCollapseButton="true">
            <!-- <div class="mini-toolbar" style="padding:2px;border-top:0;border-left:0;border-right:0;">
                <a class="mini-button" iconCls="icon-reload" onclick="treeRefresh()">刷新</a>
            </div> -->
            <div class="mini-fit">
                <ul id="tree1" class="mini-tree" style="width:95%;"
                    showTreeIcon="true" textField="modelClassName" idField="id" parentField="pid" resultAsTree="false"
                    contextMenu="#treeMenu" onendedit="onEndedit">
                </ul>
            </div>
        </div>
        <!--右侧表-->
        <div showCollapseButton="true">
        	<!-- 按钮栏 -->
            <!--菜单数据表-->
            <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" idField="id" multiSelect="false" 
            showPager="false" allowUnselect='true' onrowclick="onrowclick()">
                <div property="columns">
                    <div type="checkcolumn" ></div>
                    <div type="indexcolumn" width="60" headerAlign="center">序号</div>
                    <div field="id" headerAlign="center" align="center" visible="false">模型ID</div>
                    <div field="code" width="120" headerAlign="center" align="center">建模编码</div>
                    <div field="modelName" width="120" headerAlign="center" align="center">建模名称</div>
                    <!-- <div field="tableId" width="120" headerAlign="center" align="center" visible="false">主表ID</div>
                    <div field="sqlName" width="120" headerAlign="center" align="center">数据库表名称</div> -->
                    <div field="createDate" width="100" headerAlign="center" dateFormat="yyyy-MM-dd" align="center">创建时间</div>
                    <div name="action" width="100%" headerAlign="center" align="center" renderer="onActionRenderer" cellStyle="padding:0;">操作</div>
                </div>
            </div>
        </div>
    </div>
    <!--新增menu-->
    <ul id="addMenu" class="mini-menu" style="display:none;">
	    <li>
		    <span >新增分类</span>
		    <ul>
                <li iconCls="icon-add" onclick="onAddAfter()">插入分类</li>	
			    <li iconCls="icon-add" onclick="onAddNode()">插入子级分类</li>
		    </ul>
	    </li>
	    <li id="addModelBtn" iconCls="icon-add" onclick="addModel()">新增模型</li>
    </ul>
    <!--编辑menu-->
    <ul id="editMenu" class="mini-menu" style="display:none;">
	    <li iconCls="icon-edit" onclick="onEditNode()">编辑分类</li>
	    <li id="editModel" iconCls="icon-edit" enabled="false" onclick="onEditModel()">编辑模型</li>
    </ul>
    <!--删除menu-->
    <ul id="removeMenu" class="mini-menu" style="display:none;">
	    <li iconCls="icon-remove" onclick="onRemoveNode()">删除分类</li>
	    <li id="removeModel" iconCls="icon-remove" enabled="false" onclick="removeModel()">删除模型</li>
    </ul>
    
    <!-- 右键菜单 -->
    <ul id="treeMenu" class="mini-contextmenu"  onbeforeopen="onBeforeOpen">        
	    <!-- <li iconCls="icon-move" onclick="onMoveNode">移动节点</li>
	    <li class="separator"></li> -->
	    <li>
			<span iconCls="icon-add">新增分类</span>
			<ul>
			    <!-- <li onclick="onAddBefore">插入节点前</li> -->                
	            <!-- <li onclick="onAddAfter">插入节点后</li> -->	
	            <li onclick="onAddAfter">插入分类</li>	
				<li onclick="onAddNode">插入子级分类</li>	             
			</ul>
		</li>
		<li name="edit" iconCls="icon-edit" onclick="onEditNode">编辑分类</li>
		<li name="remove" iconCls="icon-remove" onclick="onRemoveNode">删除分类</li>        
	</ul>
	<!-- 新增节点分类弹出 -->
	<div id="editWindow" class="mini-window" title="分类" style="width:350px;" 
	    showModal="true" allowResize="true" allowDrag="true"
	    >
	    <div id="editform" class="form" >
	        <input class="mini-hidden" name="id"/>
	        <table style="width:100%;">
	            <tr>
	                <td style="width:80px;">分类名称：</td>
	                <td style="width:150px;">
	                	<input name="modelClassName" class="mini-textbox" selectOnFocus="true" onBlur="findByModelClassName" onvalidation="onNotSpaceValidation"/>
	                </td>
	            </tr>
	            <tr>
                <td style="text-align:right;padding-top:5px;padding-right:20px;" colspan="6">
                    <a class="Update_Button" href="javascript:updateClassName()">确定</a> 
                    <a class="Cancel_Button" href="javascript:cancelEditClass()">取消</a>
                </td>                
            </tr>
	        </table>
	    </div>
	</div>


    <script src="../../js/ColumnsMenu.js"></script>
    <script src="js/creatModelManage.js"></script>
</body>
</html>